package com.wedo.mall.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.e.library.adapter.Adapter;
import com.wedo.mall.R;
import com.wedo.mall.entity.AgentCategory;

import java.util.List;

/**
 * Created by lxy on 2017/6/18.
 */

public class AgentCategoryAdapter extends Adapter<AgentCategory> {

    public AgentCategoryAdapter(Context context, List<AgentCategory> datas) {
        super(context, datas);
    }

    @Override
    protected int layout() {
        return R.layout.item_seller_category;
    }

    @Override
    protected void bind(EHolder holder, AgentCategory category, int position) {
        TextView tv_name = holder.find(R.id.tv_name);
        ImageView iv_check = holder.find(R.id.iv_check);

        tv_name.setText(category.category_name);
        iv_check.setSelected(category.checked);
    }
}
